﻿using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using INDEX = System.UInt64;

namespace Library.Linq
{
    public interface ISelectMany<T>
    {
        [Pure]
        IEnumerable<TResult> SelectMany<TResult>(Func<T, IEnumerable<TResult>> selector);
        [Pure]
        IEnumerable<TResult> SelectMany<TResult>(Func<T, INDEX, IEnumerable<TResult>> selector);
        [Pure]
        IEnumerable<TResult> SelectMany<TCollection, TResult>(Func<T, IEnumerable<TCollection>> collectionSelector, Func<T, TCollection, TResult> resultSelector);
        [Pure]
        IEnumerable<TResult> SelectMany<TCollection, TResult>(Func<T, INDEX, IEnumerable<TCollection>> collectionSelector, Func<T, TCollection, TResult> resultSelector);
    }
}
